libxl: fixup error handling in libxl_send_trigger
authorIan Campbell <ian.campbell@citrix.com>
Wed, 4 Apr 2012 15:10:18 +0000 (16:10 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 4 Apr 2012 15:10:18 +0000 (16:10 +0100)
commit023c5c2aaa17341e610624c48255bde538cb8c4a
treeff8ef6b29d7484ba97c82eea262cfe62bb0c574b
parentabda66fdb0eaa1b7ec33e97e3e0e375f948dc651
libxl: fixup error handling in libxl_send_trigger

xc_domain_send_trigger returns -1 and sets errno on failure so use
LIBXL__LOG_ERRNO not LIBXL__LOG_ERRNOVAL(rc).

Change the default case of the switch to set rc=-1,errno=EINVAL too.

Also we weren't actually returning the error code we'd decided on.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c